<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css">
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-right" role="group">
							<button class="btn btn-success" onclick="reLoad()">
								<i class="fa fa-search" aria-hidden="true"></i>查询
							</button>
						</div>
						<div class="columns pull-left">
							<input id="prodtitle" name="prodtitle" type="text" class="form-control" placeholder="商品名称">
						</div>
						
						<div class="columns pull-left">
							<select data-placeholder="商品区分" class="form-control chosen-select" id="baseId" name="baseId" tabindex="2">
								<option selected value="1">平台商品</option>
								<option value="0">商户商品</option>
							</select>
						</div>
						
						<div class="pull-left search nopadding" style="width: 14%">
							<input type="text" class="laydate-icon form-control" placeholder="订单开始时间"
											   id="startTime" name="startTime"
											   onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
											   style="background-color: #fff;" readonly="readonly" th:value="${start}" onblur="chooseReLoad()"/>
						</div>
						<div class="columns pull-left">
                            <label style="font-weight: 700;float: left;padding: 3px 10px;line-height: 2;font-size: 15px">
                                <i class="fa fa-exchange"></i>
                            </label>
                        </div>
						<div class="pull-left search nopadding" style="width: 14%">
							<input type="text" class="laydate-icon form-control" placeholder="订单结束时间"
											   id="endTime" name="endTime"
											   onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
											   style="background-color: #fff;" readonly="readonly" th:value="${end}" onblur="chooseReLoad()"/>
						</div>
						<div class="columns pull-left " th:if="${flag} == '0'">
							 <select id="centreIds" name="centreIds" class="selectpicker" multiple data-live-search="true"
						     data-actions-box="true">
                                     <option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}"></option>   
                           </select>
						</div>
						
						<div class="columns pull-left " >
							 <select id="supply" name="supply" class="selectpicker"  data-live-search="true"
						     data-actions-box="true">
						         <option th:text="请选择供应商"  value=""></option>   
                                     <option th:each="item: ${supply}" th:text="${item.name}" th:value="${item.id}"></option>   
                           </select>
						</div>
						
						
					</div>
					<table id="productsortTable" data-mobile-responsive="true"></table>
				</div>
			</div>
		</div>

		<div>
			<script type="text/javascript">
				var s_line_h = 'hidden';
				var s_comSorting_h = 'hidden';
				var s_giveCommodity_h = 'hidden';
				
			</script>
		</div>
		<div shiro:hasPermission="nodirectList:manage:line">
			<script type="text/javascript">
			    s_line_h = '';
			</script>
		</div>
		<div shiro:hasPermission="nodirectList:manage:comSorting">
			<script type="text/javascript">
			    s_comSorting_h = '';
			</script>
		</div>
		<div shiro:hasPermission="nodirectList:manage:giveCommodity">
			<script type="text/javascript">
			    s_giveCommodity_h = '';
			</script>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	
	<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/i18n/defaults-*.min.js"></script>
	<script src="/js/plugins/distpicker/distpicker.data.min.js" ></script>
    <script src="/js/plugins/distpicker/distpicker.min.js" ></script>
	<script type="text/javascript" src="/js/appjs/logistics/nodirectList/productsort.js"></script>
	<script type="text/javascript">
	 $('#centreIds').selectpicker({
	        'selectedText': 'cat',
	   	    'noneSelectedText':'请选择商户',
	        'deselectAllText':'全不选',
	        'selectAllText': '全选',
	    });
	 
    $('#supply').selectpicker({
    	    'title':"请选择供应商",
	    }); 
	</script>
</body>
</html>